package cn.csdj.sism.service;

import cn.csdj.sism.pojo.Student;
import com.baomidou.mybatisplus.core.metadata.IPage;


import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Student 业务层
 * @author 李心怡
 * 2023/4/10
 */
public interface StudentService {
    /**
     * 添加
     * @param student
     * @return
     */
    public int insert(Student student);

    /**
     * 按id删除
     * @param id
     * @return
     */
    public int deleteById(Integer id);

    /**
     * 修改
     * @param student
     * @return
     */
    public int update(Student student);

    /**
     * 按id查询
     * @param id
     * @return
     */
    public Student selectById(Integer id);

    /**
     * 查询全部
     * @return
     */
    public List<Student> selectAll();

    /**
     * 分页查询
     *
     * @param current
     * @return
     */
    IPage<Student> selectPages(Integer current,Integer pageSize);
    IPage<Student> selectPagesByClassId(Integer current,Integer pageSize,Integer classId);
     IPage<Student> selectPagesByCondition(HashMap condition);
}
